package com.bamboo.framework.framework.security.controller;


import com.bamboo.framework.framework.security.service.IUserRoleService;
import com.bamboo.framework.common.format.ReturnMsg;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 郭晴
 * @since 2018-12-15
 */
@RestController
@RequestMapping("/userRole")
public class UserRoleController {

  @Resource
  private IUserRoleService iUserRoleService;

  /**
   * 保存用户角色
   * @param map 参数(里面必须包括 userId,和roleIds集合)
   */
  @PostMapping("saveUserRole")
  public ReturnMsg saveUser(@RequestBody Map<String,Object> map){
    System.out.println(map.toString());
    return iUserRoleService.saveUserRole(map);
  }

}
